package com.system.arrangement.feign;

import com.system.arrangement.been.RegistrationPool;
import com.system.arrangement.been.RegistrationPoolList;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDate;
import java.util.List;

/**
 * @author 林
 */
@FeignClient(value = "registrationPool-service")
public interface RegistrationPoolListServiceFeign {
    @PostMapping("/registrationPoolList/save")
    boolean saveHandle( RegistrationPoolList registrationPoolList);

    @DeleteMapping("/registrationPoolList/del/{id}")
    boolean deleteHandle(@PathVariable("id") int id);

    @PutMapping("/registrationPoolList/update")
    boolean updateHandle(RegistrationPoolList registrationPoolList);

    @GetMapping("/registrationPoolList/get/{id}")
    RegistrationPoolList getHandle(@PathVariable("id") int id);

    @GetMapping("/registrationPoolList/get/list")
    List<RegistrationPoolList> listHandle();

    @GetMapping("/registrationPoolList/get/getRegistrationPoolListByPoolId/{poolId}")
    List<RegistrationPoolList> getRegistrationPoolListByPoolId(@PathVariable("poolId") int poolId);

    @GetMapping("/registrationPoolList/get/findAllByArrangementId/{arrangementId}")
    List<RegistrationPoolList> findAllByArrangementId(@PathVariable("arrangementId") int arrangementId);
    @GetMapping("/registrationPoolList/get/findNumByArrangementId/{arrangementId}")
    Integer findNumByArrangementId(@PathVariable("arrangementId") int arrangementId);

    @GetMapping("/registrationPoolList/get/findLockNumByArrangementId/{arrangementId}")
    Integer findLockNumByArrangementId(@PathVariable("arrangementId") int arrangementId);

    @PostMapping("/registrationPool/save")
    Integer saveHandle( RegistrationPool registrationPool);

    @DeleteMapping("/registrationPool/del/{id}")
    boolean deleteRegistrationPoolHandle(@PathVariable("id") int id);

    @PutMapping("/registrationPool/update")
    boolean updateHandle( RegistrationPool registrationPool);

    @GetMapping("/registrationPool/get/{id}")
    RegistrationPool getRegistrationPoolHandle(@PathVariable("id") int id);

    @GetMapping("/registrationPool/get/list")
    List<RegistrationPool> listRegistrationPoolHandle();

    @GetMapping("/registrationPool/get/listByBusinessAndPoolDt/{businessId}/{poolDt}")
    List<RegistrationPool> listByBusinessAndPoolDt(
            @PathVariable("businessId") int businessId,
            @PathVariable("poolDt") LocalDate poolDt
    );

}

